﻿/* ==============================================================================
 * 功能描述：MainPanelDragGoodsItem  
 * 
 * 创 建 者：郑镇泉
 * 
 * 创建日期：2016/4/23 16:23:25
 * ==============================================================================*/
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class MainPanelDragGoodsItem : MonoBehaviour
{
    private GoodsVO data;

    public GoodsVO Data
    {
        get { return data; }
        set
        {
            data = value;
        }
    }

    private Image iconImage;

    public Image IconImage
    {
        get
        {
            if (iconImage == null)
            {
                iconImage=gameObject.AddComponent<Image>();
            }
            return iconImage;
        }
    }

    public void SetImage(Sprite sprite)
    {
        IconImage.sprite = sprite;
    }
}